#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char *argv[]) {
    char *p = 0;
    while(1) {
        p= getenv("AB");
        if(p) break;
        sleep(1);
    }
    printf("USER = %s\n",p);
}